<?php /* Smarty version Smarty-3.0.7, created on 2014-08-23 00:47:16
         compiled from "E:\project\xampp\htdocs\farmonline\code/modules/ratecomments//ratecomments.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2604153f78224f07ee7-51553475%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4f152ed13ab3fdaf7e83c51d43e55735351d2618' => 
    array (
      0 => 'E:\\project\\xampp\\htdocs\\farmonline\\code/modules/ratecomments//ratecomments.tpl',
      1 => 1408631668,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2604153f78224f07ee7-51553475',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_modifier_escape')) include 'E:\project\xampp\htdocs\farmonline\code\tools\smarty\plugins\modifier.escape.php';
?><script type="text/javascript" src="<?php echo $_smarty_tpl->getVariable('module_dir')->value;?>
js/jquery.rating.pack.js"></script>
<script type="text/javascript">
	$(function(){ $('input[@type=radio].star').rating(); });
</script>
<div id="commentrate">
	<div class="title_list"><h2><?php echo smartyTranslate(array('s'=>'Đánh giá của bạn','mod'=>'ratecomments'),$_smarty_tpl);?>
</h2></div>
	<?php if ($_smarty_tpl->getVariable('cookie')->value->isLogged()){?>
		<?php if ($_smarty_tpl->getVariable('confirmation')->value){?><p><?php echo $_smarty_tpl->getVariable('confirmation')->value;?>
</p><?php }?>
		<form action="<?php echo $_smarty_tpl->getVariable('action_url')->value;?>
" method="post" class="std productPgList" id="sendComment">
			<div class="box-rate">
				<label style="style="padding-top: 3px;margin-right: 38px !important;""><?php echo smartyTranslate(array('s'=>'Đánh giá','mod'=>'ratecomments'),$_smarty_tpl);?>
</label>
				<input class="star" type="radio" name="grade" value="1" />
				<input class="star" type="radio" name="grade" value="2" />
				<input class="star" type="radio" name="grade" value="3" />
				<input class="star" type="radio" name="grade" value="4" />
				<input class="star" type="radio" name="grade" value="5" />
			</div>
			<p>
				<label for="comment_title"><?php echo smartyTranslate(array('s'=>'Khách hàng:','mod'=>'ratecomments'),$_smarty_tpl);?>
</label>
				<?php if ($_smarty_tpl->getVariable('cookie')->value->isLogged()){?>
					<span><?php echo $_smarty_tpl->getVariable('cookie')->value->customer_firstname;?>
 <?php echo $_smarty_tpl->getVariable('cookie')->value->customer_lastname;?>
</span>
				<?php }?>
			</p>
			<p>
				<label for="content"><?php echo smartyTranslate(array('s'=>'Nhận xét:','mod'=>'ratecomments'),$_smarty_tpl);?>
</label>
				<textarea cols="46" rows="5" name="content" id="content"></textarea>
			</p>
			<p class="submit">
				<input class="button-rate" name="submitMessage" value="<?php echo smartyTranslate(array('s'=>'Bình luận','mod'=>'productcomments'),$_smarty_tpl);?>
" type="submit" />
				<input class="button-rate" value="<?php echo smartyTranslate(array('s'=>'Làm lại','mod'=>'productcomments'),$_smarty_tpl);?>
" type="reset" />
			</p>
		
		</form>
	<?php }else{ ?>
		<p><a href="<?php echo $_smarty_tpl->getVariable('base_dir')->value;?>
authentication.php"><?php echo smartyTranslate(array('s'=>'Please, Login for comment','mod'=>'ratecomments'),$_smarty_tpl);?>
</a></p>
	<?php }?>
	
		<div class="clear productPgList" style="margin-top: 15px;">
			<div class="wrap-title-comment">
				<?php echo smartyTranslate(array('s'=>'Thể hiện'),$_smarty_tpl);?>
 <span class="number">1 - <?php echo count($_smarty_tpl->getVariable('listComment')->value);?>
</span> trong tất cả các nhận xét <?php echo count($_smarty_tpl->getVariable('listComment')->value);?>

				<a href="#" id="mycarousel-prev">« Prev</a>
                <a href="#" id="mycarousel-next">Next »</a>
			</div>
			<?php if ($_smarty_tpl->getVariable('listComment')->value){?>
				<div class="wrap-comment">
					<div class="jcarousel">
						<ul id="mycarousel">
							<?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(0, null, null);?>
							<?php  $_smarty_tpl->tpl_vars['comment'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('listComment')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['comment']['iteration']=0;
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['comment']->key => $_smarty_tpl->tpl_vars['comment']->value){
 $_smarty_tpl->tpl_vars['smarty']->value['foreach']['comment']['iteration']++;
?>
								<?php if ($_smarty_tpl->getVariable('i')->value%2==0){?>
									<li class="<?php echo $_smarty_tpl->getVariable('i')->value;?>
">
								<?php }?>
									<?php if ($_smarty_tpl->tpl_vars['comment']->value['content']){?>
										<div class="line-comment <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['comment']['iteration']%2==0){?>bg-none<?php }?> ">
											<div class="title-user">
												<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['comment']->value['customer_name'],'html','UTF-8');?>
.
											</div>
											<div style="detail-comment">
												<?php echo nl2br(smarty_modifier_escape($_smarty_tpl->tpl_vars['comment']->value['content'],'html','UTF-8'));?>

											</div>
										</div>
									<?php }?>
									<?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable($_smarty_tpl->getVariable('i')->value+1, null, null);?>
									<?php if ($_smarty_tpl->getVariable('i')->value%2==0){?>
										</li>
									<?php }?>	
								
							<?php }} ?>
							
						</ul>
						<p class="jcarousel-pagination"></p>
					</div>
				</div>
			<?php }?>
		</div>
	
</div>